home *** CD-ROM | disk | FTP | other *** search
/ ftp.whtech.com / ftp.whtech.com.tar / ftp.whtech.com / datasheets and manuals / Hardware / WHT / scsi / dsr_sources_2_2001 / close < prev    next >
Text File  |  2006-10-19  |  722b  |  28 lines

  1. * I/O Opcode 1 - Close
  2. *
  3. * This routine will check to see if the file specified
  4. * is open.  If it is, it will close it.  It does this
  5. * by zeroing out the FDR address.  If the buffer needs
  6. * to be written out, it will do that and write out the
  7. * FDR.
  8. *
  9.  
  10. CLOSE0 ANDI R12,>FF00
  11.        AI   R12,24
  12.        LDCR @B02,4            Select RAM bank 2
  13.        BLWP @IFO              Check to see if file is open
  14.        JEQ  CLOSE1
  15.  
  16.        BL   @DSRERR
  17.        DATA >0700             File error
  18.  
  19. CLOSE1 BL   @FLUSH            Write buffer if necessary
  20.  
  21. * Here is where we clear the buffer address to mark
  22. * the file as closed.
  23.  
  24.        LDCR @B02,4            Select RAM bank 2
  25.        CLR  @4(R5)
  26.        LDCR @ZERO,4
  27.        B    @DSRRT
  28.